#include<stdio.h>
int main(void)
{
    char chars[20];
    while (fgets(chars,20,stdin) != NULL)
    {
        int i = 0;
        float sum = 0;
        while (chars[i] != '\n')
        {
            switch (chars[i])
            {
            case 'A':sum+=4;break;
            case 'B':sum+=3;break;
            case 'C':sum+=2;break;
            case 'D':sum+=1;break;
            case 'F':sum+=0;break;            
            case ' ':break;
            default:sum = 100;break;
            }
            i++;
        }
        if (sum>=100)
        {
            printf("Unknown\n");
        }
        else printf("%.2f\n",2*sum/(i+1));
    }
    
}